package org.jeecg.modules.payment.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 支付记录
 * @Author: sean
 * @Date:   2024-08-28
 * @Version: V1.0
 */
@Data
@TableName("payment_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="payment_record对象", description="支付记录")
public class PaymentRecord implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**用户id*/
	@Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private String accountId;
	/**业务类型*/
	@Excel(name = "业务类型", width = 15)
    @ApiModelProperty(value = "业务类型")
    private String bizType;
    @TableField(exist = false)
    private String bizTypeTxt;
	/**业务id*/
	@Excel(name = "业务id", width = 15)
    @ApiModelProperty(value = "业务id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long bizId;
	/**渠道商编号*/
	@Excel(name = "渠道商编号", width = 15)
    @ApiModelProperty(value = "渠道商编号")
    private String channelCode;
    @TableField(exist = false)
    private String channelTxt;
	/**支付编号*/
	@Excel(name = "支付编号", width = 15)
    @ApiModelProperty(value = "支付编号")
    private String payCode;
	/**渠道商支付编号*/
	@Excel(name = "渠道商支付编号", width = 15)
    @ApiModelProperty(value = "渠道商支付编号")
    private String otherCode;
	/**支付状态 0-未支付 1-已支付 2-已取消*/
	@Excel(name = "支付状态 0-未支付 1-已支付 2-已取消", width = 15)
    @ApiModelProperty(value = "支付状态 0-未支付 1-已支付 2-已取消")
    private String payStatus;
    @TableField(exist = false)
    private String payStatusTxt;
	/**实付金额*/
	@Excel(name = "实付金额", width = 15)
    @ApiModelProperty(value = "实付金额")
    private BigDecimal payAmount;
	/**支付时间*/
	@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
    /**是否删除（0：否、1：是）*/
    @Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;
}
